/* --------------------------------------
   Here's some fixes includes and fucncs
-------------------------------------- */
#undef max
#undef min

int error( char* t ) {
	std::cout << "\r\n" << "Fatal error: " << t << "\n\nPress any key for quit . . ."; 
	_getch();
	exit( 0x01 );
}

#ifndef debug(a,b)
void debug( char* msg, int pause = 1 ) {
	#if DEBUG_MODE
		/*
		FILE* f = fopen( "debug.txt", "at" );
		fputs( msg, f );
		fputs( "\n", f );
		fclose( f );
		*/
		textcolor(11);
		std::cout << "\r\n" << "DEBUG: ";
		textcolor(7);
		std::cout << msg << "\n";
		#if DEBUG_MODE == 1
			if( pause ) {
				std::cout << "\nPress any key for resume . . .";
				_getch();
			}
		#endif
	#endif
}
#endif
